package com.softserve.academy.food.model;


import com.softserve.academy.food.entity.eUser;

public class mUserInfo 
{
	private int id;
	private String fistname;
	private String lastname;
	private String mail;
	private String phone;
	private String adres;
	
	public mUserInfo()
	{	
	}
	
	public mUserInfo( eUser user )
	{	
		id = user.getId();
		fistname = user.getFistname();
		lastname = user.getLastname();
		mail = user.getMail();
		phone = user.getPhone();
		adres = user.getAdres();
	}

	public int getId() 
	{
		return id;
	}

	public void setId( int id ) 
	{
		this.id = id;
	}

	public String getFistname() 
	{
		return fistname;
	}

	public void setFistname( String fistname ) 
	{
		this.fistname = fistname;
	}

	public String getLastname() 
	{
		return lastname;
	}

	public void setLastname( String lastname ) 
	{
		this.lastname = lastname;
	}

	public String getMail() 
	{
		return mail;
	}

	public void setMail( String mail ) 
	{
		this.mail = mail;
	}

	public String getPhone() 
	{
		return phone;
	}

	public void setPhone( String phone ) 
	{
		this.phone = phone;
	}

	public String getAdres() 
	{
		return adres;
	}

	public void setAdres( String adres ) 
	{
		this.adres = adres;
	}

	@Override
	public int hashCode() 
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((adres == null) ? 0 : adres.hashCode());
		result = prime * result
				+ ((fistname == null) ? 0 : fistname.hashCode());
		result = prime * result + id;
		result = prime * result
				+ ((lastname == null) ? 0 : lastname.hashCode());
		result = prime * result + ((mail == null) ? 0 : mail.hashCode());
		result = prime * result + ((phone == null) ? 0 : phone.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) 
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof mUserInfo))
			return false;
		mUserInfo other = (mUserInfo) obj;
		if (adres == null) 
		{
			if (other.adres != null)
				return false;
		} 
		else if (!adres.equals(other.adres))
			return false;
		if (fistname == null) 
		{
			if (other.fistname != null)
				return false;
		} 
		else if (!fistname.equals(other.fistname))
			return false;
		if (id != other.id)
			return false;
		if (lastname == null) 
		{
			if (other.lastname != null)
				return false;
		} 
		else if (!lastname.equals(other.lastname))
			return false;
		if (mail == null) 
		{
			if (other.mail != null)
				return false;
		} 
		else if (!mail.equals(other.mail))
			return false;
		if (phone == null) 
		{
			if (other.phone != null)
				return false;
		} 
		else if (!phone.equals(other.phone))
			return false;
		return true;
	}

	@Override
	public String toString() 
	{
		return "mUserInfo [id=" + id + ", fistname=" + fistname + ", lastname="
				+ lastname + ", mail=" + mail + ", phone=" + phone + ", adres="
				+ adres + "]";
	}


}
